Skip to content

Always sys/random.h, I don't like Apple nor Google equally now #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jun 11, 2025

No description provided.

@phadej phadej force-pushed the sys-random-always branch from b30a3cc to 184de04 Compare June 11, 2025 15:01
... because apparently some systems don't expose getentropy via unistd.h
(as POSIX suggests since recently). (Some systems include Android).

While we are on it:
- Use `RtlGenRandom` on Windows instead of time
- Use `SecRandomCopyBytes` on macos and ios
  I have no access to ios devices, but if SecRandomCopyBytes approach
  works on macos, I hope it works on ios.
  `getentropy` is reported to not work on `ios` elsewhere.
@phadej phadej force-pushed the sys-random-always branch from 184de04 to 4072bc6 Compare June 11, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant